package com.example.mqtt.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.dsl.MessageChannels;
import org.springframework.messaging.MessageChannel;

@Configuration
public class Channels {

    //mqtt入站
    @Bean
    public MessageChannel mqttInputChannel() {
        return MessageChannels.direct("mqttInputChannel").get();
    }
    //mqtt出站
    @Bean
    public MessageChannel mqttOutboundChannel() {
        return MessageChannels.direct("mqttOutboundChannel").get();
    }

}
